package com.neusoft.hifly.information.article.entity;

import java.io.Serializable;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import com.neusoft.hifly.core.utils.GlobalConstants;

/**
 * Title: 文章资讯服务
 * <p>
 * Description: 文章扩展对象
 * <p>
 * Copyright: 2019
 * <p>
 * Company: 东软汉枫
 *
 * @author lh_neu
 * @version 1.0.0
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@TableName(value = GlobalConstants.DYNAMIC_TABLE_NAME_PREFIX + "_INFO_ARTICLE_EXT")
public class ArticleExtObj implements Serializable {
	private static final long serialVersionUID = -159183567806555L;
	// 租户逻辑ID
	@TableField(value = "ORGAN_LOGIC_ID")
	private long organLogicId;
	// 文章逻辑ID
	@TableId(value = "ARTICLE_LOGIC_ID")
	private long articleLogicId;
	// 扩展字段1
	@TableField(value = "EXT1")
	private String ext1;
	// 扩展字段2
	@TableField(value = "EXT2")
	private String ext2;
	// 扩展字段3
	@TableField(value = "EXT3")
	private String ext3;
	// 扩展字段4
	@TableField(value = "EXT4")
	private String ext4;
	// 扩展字段5
	@TableField(value = "EXT5")
	private String ext5;
	// 扩展字段6
	@TableField(value = "EXT6")
	private String ext6;
	// 扩展字段7
	@TableField(value = "EXT7")
	private String ext7;
	// 扩展字段8
	@TableField(value = "EXT8")
	private String ext8;
	// 扩展字段9
	@TableField(value = "EXT9")
	private String ext9;
	// 扩展字段10
	@TableField(value = "EXT10")
	private String ext10;

	// ################### 临时数据 ####################
	// 租户编码
	@TableField(exist = false)
	private String organCode;

	/**
	 * 得到对象的哈希值
	 *
	 * @return int 对象的哈希值
	 */
	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(this.getArticleLogicId()).toHashCode();
	}

	/**
	 * 比较两个对象是否相等
	 *
	 * @param other
	 *            要比较的对象
	 * @return boolean 相同返回true，否则返回flase
	 */
	@Override
	public boolean equals(final Object other) {
		if (!(other instanceof ArticleExtObj)) {
			return false;
		}
		final ArticleExtObj castOther = (ArticleExtObj) other;
		return new EqualsBuilder().append(this.getArticleLogicId(), castOther.getArticleLogicId()).isEquals();
	}

	/**
	 * 返回对象的字符串值
	 *
	 * @return String 表示用户对象的字符串值
	 */
	@Override
	public String toString() {
		return new ToStringBuilder(this).append("文章扩展", this.getArticleLogicId()).toString();
	}

	public long getOrganLogicId() {
		return organLogicId;
	}

	public void setOrganLogicId(final long organLogicId) {
		this.organLogicId = organLogicId;
	}

	public long getArticleLogicId() {
		return articleLogicId;
	}

	public void setArticleLogicId(final long articleLogicId) {
		this.articleLogicId = articleLogicId;
	}

	public String getExt1() {
		return ext1;
	}

	public void setExt1(final String ext1) {
		this.ext1 = ext1;
	}

	public String getExt2() {
		return ext2;
	}

	public void setExt2(final String ext2) {
		this.ext2 = ext2;
	}

	public String getExt3() {
		return ext3;
	}

	public void setExt3(final String ext3) {
		this.ext3 = ext3;
	}

	public String getExt4() {
		return ext4;
	}

	public void setExt4(final String ext4) {
		this.ext4 = ext4;
	}

	public String getExt5() {
		return ext5;
	}

	public void setExt5(final String ext5) {
		this.ext5 = ext5;
	}

	public String getExt6() {
		return ext6;
	}

	public void setExt6(final String ext6) {
		this.ext6 = ext6;
	}

	public String getExt7() {
		return ext7;
	}

	public void setExt7(final String ext7) {
		this.ext7 = ext7;
	}

	public String getExt8() {
		return ext8;
	}

	public void setExt8(final String ext8) {
		this.ext8 = ext8;
	}

	public String getExt9() {
		return ext9;
	}

	public void setExt9(final String ext9) {
		this.ext9 = ext9;
	}

	public String getExt10() {
		return ext10;
	}

	public void setExt10(final String ext10) {
		this.ext10 = ext10;
	}

	public String getOrganCode() {
		return organCode;
	}

	public void setOrganCode(final String organCode) {
		this.organCode = organCode;
	}

}